package org.databandtech.api.controller;

import java.util.List;

import org.databandtech.api.entity.DatabandSitemenu;
import org.databandtech.api.service.IDatabandSitemenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 站点菜单Controller
 * 
 * @author databand
 * @date 2020-12-31
 */
@Controller
@RequestMapping("/api/sitemenu")
public class DatabandSitemenuController 
{
    protected String prefix = "/api/sitemenu";

    @Autowired(required=true)
    private IDatabandSitemenuService databandSitemenuService;



    @GetMapping("/list")
    @ResponseBody
    public List<DatabandSitemenu> list(DatabandSitemenu databandSitemenu)
    {
        List<DatabandSitemenu> list = databandSitemenuService.selectDatabandSitemenuList(databandSitemenu);
        return list;
    }

    @GetMapping("/listBySiteId/{siteid}")
    @ResponseBody
    public List<DatabandSitemenu> listBySiteId(@PathVariable("siteid") Long siteid)
    {

        List<DatabandSitemenu> list = databandSitemenuService.selectDatabandSitemenuListBySiteid(siteid);
        return list;
    }

   
}
